package main

import(
  _ "strconv"
)

var(
  UserManager * Usermanager
)

func InitUserManager()error{
  UserManager = &Usermanager{make(map[string]UserIdentity)}
  return nil
}


type Usermanager struct{
  Users map[string]UserIdentity
}

func (*UserIdentity) Login() error{
  return nil
}

type UserIdentity struct{
  info * Userinfo
  devices * Devicelist
}

type Userinfo struct{
  UUID string
  account string //类似QQ号那样的
  password string

  address string
  nickname string
  email string
  avatar string
  company string
  gender int
  age int
  title string
  height string
  introduction string
  personal_sign string
}

const(
  Gender_Male = iota
  Gender_Female
)

type Device struct{
  UDID string
  ip string
  last_login_time int
  token string
  token_expire_time int
}

type Devicelist []Device

func (*Devicelist)FindDevice(UDID string) *Device{
    return nil
}
